home *** CD-ROM | disk | FTP | other *** search
- Path: noc.netcom.net!news
- From: Tarang Deshpande <tarang@willows.com>
- Newsgroups: comp.lang.c,comp.unix.programmer,comp.unix.questions
- Subject: Re: Correct usage of system call?
- Date: Wed, 27 Mar 1996 18:35:01 -0800
- Organization: NETCOM Network Operations
- Message-ID: <3159FAD5.5EB7@willows.com>
- References: <4jb03v$oi6@news.tamu.edu>
- NNTP-Posting-Host: daffy.willows.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0GoldB2 (Win95; I)
-
- Justin Ray Mcelhanon wrote:
- >
- >
- > It works great, however, I'd like to add in a command to allow one to
- > type in the site name. Example, when you call up the ftp case it does
- > a scanf(%s,site); (with site declared as an char string) anyway I then
- > want to take that and put it in the system command. ie system("ftp site"),
-
- try:
-
- sprintf ( Command, "pine %s", site );
- system ( Command );
-
- where Command is a string that is large enough.
-